﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pattern_Observer
{
    class Program
    {
        static void Main(string[] args)
        {
            Subject s = new Subject1();
            s.SubjectState = "ABC";

            Observer observer1 = new Observer1("张3", s);
            Observer observer2 = new Observer1("李4", s);

            s.Attach(observer1);
            s.Attach(observer2);
            s.Notify();
        }
    }
}
